package cc.zy.base.hr.mapper;

import cc.zy.base.hr.entity.ScoreMapping;
import cc.zy.base.hr.entity.StaffLabel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 1 * 积分换算规则
 * 2 * mapper
 * 3 * @Author: Junjie
 * 4 * @Date: 2022/3/8 19:29
 */
public interface ScoreMappingMapper extends BaseMapper<ScoreMapping> {

    /**
     * 方法描述：查找积分换算规则详细信息
     *
     * @param page 分页对象
     * @param scoreMapping 换算规则对象，用于传递查询条件
     * @return Ipage
     * @author Chenjunjie
     * @date 2022/3/8 19:32
     */
    <T>IPage<ScoreMapping> findScoreMappingDetailPage(Page<T> page, @Param("scoreMapping") ScoreMapping scoreMapping);

    long countScoreMappingDetail(@Param("scoreMapping") ScoreMapping scoreMapping);

    /**
     * 通过ID查找积分规则
     *
     * @return 员工标签
     */
    ScoreMapping findById(Integer scoreMappingId);

    /**
     * 查询不带分页
     */
    List<ScoreMapping> findScoreMappingListNotPage(@Param("scoreMapping") ScoreMapping scoreMapping);


    List<ScoreMapping> isRepetitive(@Param("maxValue") BigDecimal maxValue , @Param("minValue") BigDecimal minValue);
}
